from GuiObject import *

class GuiBtn(GuiObject):
	def __init__(self, x_, y_, w_, h_, label_, font_, fontSize_):
		GuiObject.__init__(self)
		self.label = label_
		self.x = x_
		self.y = y_
		self.w = w_
		self.h = h_
		self.font = pygame.font.Font(font_, fontSize_)
	def draw(self):
		labelSurface = self.font.render(self.label, 1, (255,255,255))
		pygame.draw.rect(self.screen, (95,95,95), (self.parent.x+self.x, self.parent.y+self.y, self.w, self.h))
		pygame.draw.rect(self.screen, (75,75,75), (self.parent.x+self.x+1, self.parent.y+self.y+1, self.w-2, self.h-2))
		labelX = (self.getX())+(self.w/2)-(labelSurface.get_width()/2)
		labelY = (self.getY())+self.h/2-(labelSurface.get_height()/2)
		self.screen.blit(labelSurface, ( labelX, labelY, self.w,self.h))
		
